import React from 'react'
import { Swiper, Toast } from 'antd-mobile'
import { $pre } from '../../../../http/http';
import './GetNew.less'
import Item from 'antd-mobile/es/components/dropdown/item'
export default function GetNew(props) {
    let { getnew } = props;
    return (
        <div className='box'>
            <Swiper slideSize={40} trackOffset={10} loop stuckAtBoundary={false}>
            {getnew.map((item) => {
                return (
                    <Swiper.Item key={item.id} className='itembox'>
                        <img src={$pre + item.img} style={{ height: '120px', width: '120px' }} alt="" />
                        <h1>{item.goodsname}</h1>
                        <p>原价：￥{item.market_price}</p>
                        <p>现价：￥{item.price}</p>
                    </Swiper.Item>
                )
            })}
        </Swiper>
        
        {/* <Swiper slideSize={70} trackOffset={15} loop stuckAtBoundary={false}>
          {items}
        </Swiper> */}
      
        </div>
        

    )
}
